home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
upplow
/
upplowhl.frm
< prev
Wrap
Text File
|
1995-03-01
|
3KB
|
79 lines
VERSION 2.00
Begin Form Form2
BackColor = &H00808080&
BorderStyle = 3 'Fixed Double
Caption = "Function - ForceUpperOrLowerCase"
ClientHeight = 4020
ClientLeft = 3195
ClientTop = 2610
ClientWidth = 6015
ControlBox = 0 'False
Height = 4455
Left = 3120
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
MousePointer = 3 'I-Beam
ScaleHeight = 4020
ScaleWidth = 6015
Top = 2250
Width = 6165
Begin TextBox Text1
Alignment = 2 'Center
BackColor = &H00808080&
BorderStyle = 0 'None
ForeColor = &H0000FFFF&
Height = 3615
Left = 120
MultiLine = -1 'True
TabIndex = 0
Text = "Text1"
Top = 120
Width = 5415
End
End
' SetUpLoH.Bas - Help Screen
' 95/03/02 Copyright 1995, Larry Rebich, The Bridge, Inc.
Option Explicit
DefInt A-Z
Declare Sub SendMessage Lib "User" (ByVal hWnd%, ByVal wMsg%, ByVal wParam%, lParam As Any)
Sub BuildHelpMessage ()
Dim Msg As String
Dim Cr As String * 2
Cr = Chr$(13) & Chr$(10)
Msg = Cr
Msg = Msg & "Any text entered in the upper case text box is converted to all upper case. "
Msg = Msg & "Any text entered in the lower case text box is converted to all lower case." & Cr
Msg = Msg & Cr
Msg = Msg & "Function ForceUpperOrLowerCase is used to force "
Msg = Msg & "upper or lower "
Msg = Msg & "case input. For example: " & Cr & Cr
Msg = Msg & "x = ForceUpperOrLowerCase(Text1(1), True)"
Msg = Msg & Cr & Cr
Msg = Msg & "See module UppLow.Bas for details." & Cr & Cr
Msg = Msg & "Note: This text box has been set to 'read only' using API SendMessage. See subroutine 'SetReadOnly' in this form for details." & Cr
Text1 = Msg
End Sub
Sub Form_Load ()
Dim l, t, w, h
w = Text1.Width + 500 'make form fit the text box
h = Text1.Height + 500
l = (Screen.Width - w) \ 2
t = Form1.Top + Form1.Height + 100 'just below the main form
Move l, t, w, h
Text1.Move 150, 150 'set its location
SetReadOnly Text1 'set text box to read only
BuildHelpMessage 'build the message
End Sub
Sub SetReadOnly (TheControl As Control)
Const WM_USER = &H400
Const EM_SETREADONLY = (WM_USER + 31)
SendMessage TheControl.hWnd, EM_SETREADONLY, 1, 0
End Sub